<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>

<%--
  Created by IntelliJ IDEA.
  User: ZhangYao
  Date: 2022/8/12
  Time: 17:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<html>
<head>
    <title>客房界面</title>
    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <style>
        h1{
            text-align: center;
            color: black;
            font-size: 18px;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="row clerfix">
        <div class="col-md-12 colum">
            <div class="page-header" >
                <h1>
                    <small>显示所有客房</small>
                </h1>

            </div>
        </div>
    </div>
    <div class="row clearfix">
        <div class="col-md-12 colum">
            <table class="table table-hover table-striped">
                <thead>
                <tr>
                    <th>房间号</th>
                    <th>房间类型</th>
                    <th>房间价格</th>
                    <th>房间状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach var="room" items="${list}">
                    <tr>
                        <td>${room.roomId}</td>
                        <td>${room.roomType}</td>
                        <td>${room.roomPrice}</td>
                        <td>${room.roomState}</td>

                        <td>
                            <a href="${pageContext.request.contextPath}/Order/toUpdateRoomState?roomId=${room.roomId}&roomState=${room.roomState}">修改房间状态</a>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>
    </div>
</div>

</body>
</html>
